<template>
  <el-switch :active-text="$t(activeText)" :inactive-text="$t(inactiveText)"></el-switch>
</template>

<script lang="ts" setup>
import { useI18n } from 'vue-i18n'

const props = defineProps<{
  i18n?: boolean
  i18nPrefix?: string
  activeText?: string
  inactiveText?: string
}>()
const { t } = useI18n()
const $t = (text?: string) => {
  return props.i18n && text ? t((props.i18nPrefix ? props.i18nPrefix + '.' : '') + text) : text
}
</script>

<style lang="scss"></style>
